package business.global.pk.ddz.cardtype.type;

import business.ddz.c2s.cclass.DDZ_define;
import business.global.pk.alg.params.BaseOpCard;
import business.global.pk.alg.params.BasePKParameter;
import business.global.pk.alg.type.Type_ThreeZone;
import business.global.pk.ddz.cardtype.util.DDZALGUtil;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * 3不带
 */
public class DDZThreeZone extends Type_ThreeZone<DDZALGUtil> {
    private List<Integer> cardTypeList = new ArrayList<>(Arrays.asList(DDZ_define.DDZ_CARD_TYPE.DDZ_CARD_TYPE_NOMARL.value(),
            DDZ_define.DDZ_CARD_TYPE.DDZ_CARD_TYPE_3BUDAI.value()));

    @Override
    public BaseOpCard getCardList(BasePKParameter parameter) {
        if (cardTypeList.contains(parameter.previousOpType)) {
            parameter.targetType = DDZ_define.DDZ_CARD_TYPE.DDZ_CARD_TYPE_3BUDAI.value();
            return getBasePKALGUtil().getThreeZone(parameter);
        }
        return null;
    }

    @Override
    public BaseOpCard checkCardList(BasePKParameter parameter) {
        return getBasePKALGUtil().checkThreeZone(parameter);
    }

    @Override
    public DDZALGUtil getBasePKALGUtil() {
        return DDZALGUtil.getInstance();
    }
}
